<template>
    <el-button :type="btnType" :plain="plain" @click="goBack"><< 返回</el-button>
</template>

<script>
    export default {
        name: 'goBack',
        props: {
            btnType: {
                type: String,
                default: 'primary'
            },
            plain: {
                type: Boolean,
                default: false
            }
        },
        methods: {
            // 返回上一级
            goBack () {
                this.$router.go(-1)
            }
        }
    }
</script>

<style scoped>

</style>
